<template>
  <div class="app-container">
    <!-- 顶部header区域 -->
    <mt-header fixed title="资讯商城"></mt-header>

    <!-- 中间路由router-view 区域 -->
    <transition>
      <router-view></router-view>
    </transition>

    <!-- 底部tabbar区域 -->
    <nav class="mui-bar mui-bar-tab">
      <router-link class="mui-tab-item1" to="/home">
        <span class="mui-icon mui-icon-home"></span>
        <span class="mui-tab-label">首页</span>
      </router-link>
      <router-link class="mui-tab-item1" to="/member">
        <span class="mui-icon mui-icon-contact"></span>
        <span class="mui-tab-label">会员</span>
      </router-link>
      <router-link class="mui-tab-item1" to="/shopcar">
        <span class="mui-icon mui-icon-extra mui-icon-extra-cart">
          <span class="mui-badge">0</span>
        </span>
        <span class="mui-tab-label">购物车</span>
      </router-link>
      <router-link class="mui-tab-item1" to="/search">
        <span class="mui-icon mui-icon-search"></span>
        <span class="mui-tab-label">搜索</span>
      </router-link>
    </nav>
  </div>
</template>

<script>
</script>


 <style lang="scss" scoped>
.app-container {
  padding-top: 40px;
  //右侧没进来的页面先隐藏
  overflow-x: hidden;
  padding-bottom: 50px;
}

.v-enter {
  //右侧进入
  opacity: 0;
  //正数代表从右侧进入，设置进入的页面大小
  transform: translateX(100%);
}
.v-leave-to {
  //左侧消失
  opacity: 0;
  //设置消失的位置
  transform: translateX(-100%);
  //解决页面上下窜动
  position: absolute;
}
.v-enter-active,
.v-leave-actice {
  transition: all 0.5s ease;
}

// 改变类名，使路由跳转重新好使
.mui-bar-tab .mui-tab-item1.mui-active {
    color: #007aff;
}
.mui-bar-tab .mui-tab-item1 {
    display: table-cell;
    overflow: hidden;
    width: 1%;
    height: 50px;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #929292;
}

.mui-bar-tab .mui-tab-item1 .mui-icon {
    top: 3px;
    width: 24px;
    height: 24px;
    padding-top: 0;
    padding-bottom: 0;
}

.mui-bar-tab .mui-tab-item1 .mui-icon~.mui-tab-label {
    font-size: 11px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}
//一个元素class引用两个类选择器，写法是用空格隔开 那么就先读取第一个，再读取第二个，有相同的css属性，以最后
// 那个为标准
// .a.b{} 代表同时引用这两个类的元素，class="a b"
.mint-header{
  z-index: 99;//正数元素在上面，负数元素在下面。
}
</style>
